<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@taglib prefix="supda" uri="http://www.supda.com/supda_tag" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!--_meta 作为公共模版分离出去-->
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<LINK rel="Bookmark" href="/favicon.ico" >
<LINK rel="Shortcut Icon" href="/favicon.ico" />
<!--[if lt IE 9]>
<script type="text/javascript" src="<%=basePath%>static/lib/html5.js"></script>
<script type="text/javascript" src="<%=basePath%>static/lib/respond.min.js"></script>
<script type="text/javascript" src="<%=basePath%>static/lib/PIE_IE678.js"></script>
<![endif]-->
<link rel="stylesheet" type="text/css" href="<%=basePath%>static/static/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css" href="<%=basePath%>static/static/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css" href="<%=basePath%>static/lib/Hui-iconfont/1.0.7/iconfont.css" />
<link rel="stylesheet" type="text/css" href="<%=basePath%>static/lib/icheck/icheck.css" />
<link rel="stylesheet" type="text/css" href="<%=basePath%>static/static/h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css" href="<%=basePath%>static/static/h-ui.admin/css/style.css" />
<!--[if IE 6]>
<script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->
<!--/meta 作为公共模版分离出去-->

<title>基本设置</title>
</head>
<body>
<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 监控管理 <span class="c-gray en">&gt;</span> 监控设置 <a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>
<div class="page-container">
	<form class="form form-horizontal" id="form-property-add">
		<input type="hidden" name="id" value="${serverWarnProperties.id}"/>
		<div id="tab-system" class="HuiTab">
			<div class="tabBar cl"><span>告警设置</span><span>通知设置</span></div>
			<div class="tabCon">
				<div class="row cl">			
					<label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>CPU告警值：</label>
					<div class="formControls col-xs-8 col-sm-9">
						<input type="text" id="website-title" placeholder="0-100以内的整数" name="cpuWarn" value="${serverWarnProperties.cpuWarn}" class="input-text">
					</div>
				</div>
				<div class="row cl">
					<label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>memory告警值：</label>
					<div class="formControls col-xs-8 col-sm-9">
						<input type="text" id="website-Keywords" placeholder="0-100以内的整数" name="memoryWarn" value="${serverWarnProperties.memoryWarn}" class="input-text">
					</div>
				</div>
				<div class="row cl">
					<label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>磁盘告警值：</label>
					<div class="formControls col-xs-8 col-sm-9">
						<input type="text" id="website-description" placeholder="0-100以内的整数" name="diskWarn" value="${serverWarnProperties.diskWarn}" class="input-text">
					</div>
				</div>
				<div class="row cl">
					<label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>SWAP告警值：</label>
					<div class="formControls col-xs-8 col-sm-9">
						<input type="text" id="website-static" placeholder="0-100以内的整数" name="swarpWarn" value="${serverWarnProperties.swarpWarn}" class="input-text">
					</div>
				</div>
				<div class="row cl">
					<label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>JVM内存告警值：</label>
					<div class="formControls col-xs-8 col-sm-9">
						<input type="text" id="website-uploadfile" placeholder="0-100以内的整数" name="jvmWarn" value="${serverWarnProperties.jvmWarn}" class="input-text">
					</div>
				</div>
			</div>
			<div class="tabCon">
				<div class="row cl">
					<label class="form-label col-xs-4 col-sm-2">硬件信息Check次数：</label>
					<div class="formControls col-xs-8 col-sm-9">
						<input type="text" class="input-text" name="checkTimes" value="${serverWarnProperties.checkTimes}" id="" name="" >
					</div>
				</div>
				<div class="row cl">
					<label class="form-label col-xs-4 col-sm-2">Check周期(秒)：</label>
					<div class="formControls col-xs-8 col-sm-9">
						<input type="text" class="input-text" name="checkbytimeSpace" value="${serverWarnProperties.checkbytimeSpace}" id="" name="" >
					</div>
				</div>
				<div class="row cl">
					<label class="form-label col-xs-4 col-sm-2">实时监控周期(秒)：</label>
					<div class="formControls col-xs-8 col-sm-9">
						<input type="text" class="input-text" name="checkActualtimeSpace" value="${serverWarnProperties.checkActualtimeSpace}" id="" name="" >
					</div>
				</div>
				<div class="row cl">
					<label class="form-label col-xs-4 col-sm-2">通知角色：</label>
					<div class="formControls col-xs-8 col-sm-9"> <span class="select-box">
						<select class="select" size="1"  name="TRole.id">
							<c:forEach items="${roles}" var="role">
								<option value="${role.id}" 
								<c:if test="${serverWarnProperties.TRole.id == role.id}">
										selected="selected"
									</c:if>
									>${role.name}</option>
							</c:forEach>
						</select>
						</span> 
					</div>	
					</div>
				</div>
			</div>
		</div>
		<div class="row cl">
			<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
				<button id="form-property-submit" class="btn btn-primary radius" type="button"><i class="Hui-iconfont">&#xe632;</i> 保存</button>
				<button onClick="layer_close();" class="btn btn-default radius" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
			</div>
		</div>
	</form>
</div>

<!--_footer 作为公共模版分离出去-->
<script type="text/javascript" src="<%=basePath%>static/lib/jquery/1.9.1/jquery.min.js"></script> 
<script type="text/javascript" src="<%=basePath%>static/lib/layer/2.1/layer.js"></script> 
<script type="text/javascript" src="<%=basePath%>static/lib/icheck/jquery.icheck.min.js"></script> 
<script type="text/javascript" src="<%=basePath%>static/lib/jquery.validation/1.14.0/jquery.validate.min.js"></script> 
<script type="text/javascript" src="<%=basePath%>static/lib/jquery.validation/1.14.0/validate-methods.js"></script> 
<script type="text/javascript" src="<%=basePath%>static/lib/jquery.validation/1.14.0/messages_zh.min.js"></script> 
<script type="text/javascript" src="<%=basePath%>static/static/h-ui/js/H-ui.js"></script> 
<script type="text/javascript" src="<%=basePath%>static/static/h-ui.admin/js/H-ui.admin.js"></script> 
<!--/_footer /作为公共模版分离出去-->

<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript">
$(function(){
	
	$("#form-property-submit").click(function(){
		$.ajax({
 				type : "post",
 				dataType:"json",
 				url:'<%=basePath%>property/edit.shtml',
 				data:$('#form-property-add').serialize(),
 				success : function(data) {
					if (data=="success") {
						layer.alert('修改成功！');
 						
 					} else {
 						layer.alert('修改失败,请重试！');
 					}
				
 				}
 			});
	});
	
	
	$('.skin-minimal input').iCheck({
		checkboxClass: 'icheckbox-blue',
		radioClass: 'iradio-blue',
		increaseArea: '20%'
	});
	$.Huitab("#tab-system .tabBar span","#tab-system .tabCon","current","click","0");
});
</script>
<!--/请在上方写此页面业务相关的脚本-->
</body>
</html>
